:bug: Fix Bug: error.message was deprecated in Python 2.6 and removed in Python 3

huangqimin 5 年 前
コミット
ecae93df3f
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      pay/views.py

+ 1 - 1
pay/views.py

@@ -114,7 +114,7 @@ def wx_order_create_api(request):
114 114
             openid=user.openid,  # 可选,用户在商户appid下的唯一标识。trade_type=JSAPI,此参数必传
115 115
         )
116 116
     except WeChatPayException as e:
117
-        order.unifiedorder_result = e.message
117
+        order.unifiedorder_result = e.args
118 118
         order.save()
119 119
         return response(OrderStatusCode.WX_UNIFIED_ORDER_FAIL)
120 120